<?php include('_init_.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>班尼頓寫真後台管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="../css/admin-body.css" rel="stylesheet" type="text/css" />
<link href="../css/ConAdd.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/jquery-1.4.2.min.js"></script>
<script src="<?php echo constant('APP_JS_LIB_DIR');?>/ckeditor/ckeditor.js"></script>
<script type="text/javascript">
function check_and_post_form()
{
	var form = document.forms['page_form'];
	if ( form.subject.value == '' ) {
		alert('請輸入電子報的主旨');
		window.scrollTo(0,0);
		return false;
	}
	if (typeof CKEDITOR !== "undefined") {
	    for ( instance in CKEDITOR.instances )
	        CKEDITOR.instances[instance].updateElement();
	}
	if ( form.content.value == '' ) {
		alert('請輸入電子報的內容');
		window.scrollTo(0,0);
		return false;
	}
	form.submit();
	return false;
}
</script>
</head>

<body>
<?php include_once('admin-top.php');?>
<form method="post" action="<?php echo $_SERVER['PHP_SELF']?>" name="page_form"> 
<input type="hidden" name="id" value="<?php echo $GLOBALS['PAGE_FORM_DATA']['id'];?>"/>
<input type="hidden" name="act" value="save"/>
<div id="main" class="clearfix"><!-- star #main //-->
  
  <div id="contactall"><!-- star #main //-->
  <div id="tit" ><!-- star #tit //-->
    <ul>
    <li class="tit-a"><?php echo  $GLOBALS['PAGE_FORM_DATA']['id'] > 0 ?'修改':'新增'; ?>電子報</li>
    </ul>
  </div><!-- end #tit //-->
  <div id="contact" class="clearfix" ><!-- star #contact //-->
    <ul>
      <li>主旨： <input name="subject" type="text" class="keyina" placeholder="請輸入電子報的主旨" value="<?php echo $GLOBALS['PAGE_FORM_DATA']['subject'];?>"/>
    </li>
    </ul>
  </div><!-- end #contact //-->
  <div id="ContactHtm" ><!-- star #contactHtm //-->
   <textarea class="ckeditor" name="content"><?php echo $GLOBALS['PAGE_FORM_DATA']['content'];?></textarea>
   </div><!-- end #contactHtm //-->
    <div id="ContactSet" ><!-- star #contactSet //-->
    <ul>
    <li class="cs-4"><a href="#save" onclick="return check_and_post_form();">儲存</a> </li>
    </ul>
    </div><!-- end #contactSet //-->
  </div><!-- end #contactall //-->
</div><!-- end #main //-->
</form>
</body>
</html>